from pydantic import BaseModel
from typing import List


class SchoolStats(BaseModel):
    """单个学校的统计信息"""
    school_id: int
    school_name: str
    class_count: int
    course_count: int

    class Config:
        from_attributes = True


class StatisticsResponse(BaseModel):
    """统计信息响应体"""
    code: int = 200
    message: str = "操作成功"
    data: List[SchoolStats]
